<?php

class Form_Member extends Form_Custom_General {

    public function init() {
    $member_prefix = $this->createElement('select', 'mem_prefix')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select prefix.')))
                ->setAttribs(Array('class' => "select2 member-prefix", 'style' => "width:100%"));
        $this->addElement($member_prefix);

       
        $mem_name = $this->createElement('text', 'mem_name')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'First name should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_name);

        $mem_surname = $this->createElement('text', 'mem_surname')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Surname should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_surname);

       
         $member_email = $this->createElement('text', 'member_email')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
                ->addValidator(new Zend_Validate_EmailAddress())
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $member_email->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        $this->addElement($member_email);
        
        
        $member_password = $this->createElement('password', 'member_password')
               # ->setRequired(TRUE)
               # ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
               # ->addValidator(new Zend_Validate_EmailAddress())
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
               ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($member_password);
        
        $company_name = $this->createElement('text', 'mem_company_name')
                #->setRequired(FALSE)
                #->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Telephone should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($company_name);
        
        $company_type = $this->createElement('select', 'mem_company_type')
                #->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                #->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array('class' => "select2 member-country", 'style' => "width:100%"));
        $this->addElement($company_type);
        
        
        $member_dob = $this->createElement('text', 'mem_bday')
                #->setRequired(TRUE)
               # ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Telephone should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control date-picker", "placeholder" => ""));
        $this->addElement($member_dob);
        
        $member_fax = $this->createElement('text', 'mem_fax')
                #->setRequired(TRUE)
               # ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Telephone should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($member_fax);
        
        
        $member_phone = $this->createElement('text', 'member_phone')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Telephone should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($member_phone);
        
        
        
        
        $mem_mobile = $this->createElement('text', 'mem_mobile')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Mobile should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_mobile);
        
        
        $mem_landline = $this->createElement('text', 'mem_landline')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Landline number should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_landline);
        
        
        $mem_work = $this->createElement('text', 'mem_work')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Work phone should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_work);
        
        $client_referral_name = $this->createElement('select', 'client_referral_name')
                #->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select member')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control select2", "placeholder" => ""));
        $this->addElement($client_referral_name);
        
        
      /*  $client_type = $this->createElement('select', 'mem_client_type')
                #->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                #->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array('class' => "select2 member-client-type", 'style' => "width:100%"));
        $this->addElement($client_type);
        */
        $client_status = $this->createElement('select', 'mem_client_status')
                #->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                #->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array('class' => "select2 member-client-status", 'style' => "width:100%"));
        $this->addElement($client_status);
        
         $client_datepicker = $this->createElement('text', 'mem_client_calender')
                #->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                #->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array('class' => "form-control  member-client_datepicker"));
        $this->addElement($client_datepicker);
        
        $client_note = $this->createElement('textarea', 'mem_client_note')
                #->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                #->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array("rows" => '5', 'class' => "form-control member-client_note"));
        $this->addElement($client_note);
        
       /*  $client_status = $this->createElement('select', 'client_status')
                #->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                #->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array('class' => "select2 member-client_status", 'style' => "width:100%"));
        $this->addElement($client_status);
        */
        
        
        $mem_representative_name = $this->createElement('text', 'mem_representative_name1')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative name should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_representative_name);
        
        
        $mem_representative_telephone1 = $this->createElement('text', 'mem_representative_telephone1')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative telephone1 should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_representative_telephone1);
        
        
       $mem_representative_email = $this->createElement('text', 'mem_representative_email1')
                #->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
                ->addValidator(new Zend_Validate_EmailAddress())
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $mem_representative_email->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        $this->addElement($mem_representative_email);
        
        
        $mem_representative_name_2 = $this->createElement('text', 'mem_representative_name2')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative name should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_representative_name_2);
        
        
        $mem_representative_telephone1_2 = $this->createElement('text', 'mem_representative_telephone2')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative telephone1 should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_representative_telephone1_2);
        
        
       $mem_representative_email_2 = $this->createElement('text', 'mem_representative_email2')
                #->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
                ->addValidator(new Zend_Validate_EmailAddress())
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $mem_representative_email_2->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        $this->addElement($mem_representative_email_2);
        
        
        
        $mem_representative_name_3 = $this->createElement('text', 'mem_representative_name3')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative name should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_representative_name_3);
        
        
        $mem_representative_telephone1_3 = $this->createElement('text', 'mem_representative_telephone3')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Representative telephone1 should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_representative_telephone1_3);
        
        
       $mem_representative_email_3 = $this->createElement('text', 'mem_representative_email3')
                #->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Email address should not be blank.')))
                ->addValidator(new Zend_Validate_EmailAddress())
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $mem_representative_email_3->getValidator('emailAddress')->setMessage("Email address is not valid.", Zend_Validate_EmailAddress::INVALID_FORMAT);
        $this->addElement($mem_representative_email_3);
        
        
        
        
        
        $mem_address = $this->createElement('text', 'mem_address')
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Address should not be blank.')))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->setAttribs(Array('class' => "form-control", "placeholder" => ""));
        $this->addElement($mem_address);

        $mem_country = $this->createElement('select', 'mem_country')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select country.')))
                ->setAttribs(Array('class' => "select2 member-country", 'style' => "width:100%"));
        $this->addElement($mem_country);

        $mem_city = $this->createElement('select', 'mem_city')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select city.')))
                ->setAttribs(Array('class' => "select2 member-city", 'style' => "width:100%"));
        $this->addElement($mem_city);
        
        

       
    }

}